<%--
$Id: header.jsp 19 2011-06-11 04:06:06Z feigme $
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/commons/taglibs.jsp" %> 	
<div class="site-user-nav">
		<a id="frist" title="Login" class="welcome" href="#">Message !</a>
		<a href="${ctx }/">首页</a> 
		<a href="#">注册</a> 
		<a href="${ctx }/login">登录</a> 
</div>
<div class="site-logo">
	<div class="logo">
		<img alt="" src="${ctx }/image/logo.png">
	</div>
	<div class="search-box">
	<form action="${ctx }/search" method="get">
		<div class="category">
			<div id="categoryType" class="type">
				<div id="typeCurrent" class="current">
					<a id="typeItem" href="javascript:void(0);">
					<c:choose>
						<c:when test="${type==1 }">
							店铺 
						</c:when>
						<c:otherwise>
							商品
						</c:otherwise>
					</c:choose>	
					</a>
					<span class="angle"></span>
				</div>
				<ul id="typeList" class="typeList" style="display: none;">
					<li><a attr="0" href="javascript:void(0);">商品</a></li>
					<li><a attr="1" href="javascript:void(0);">店铺</a></li>
				</ul>
			</div>
		</div>
		<input type="text" autocomplete="off" value="<c:out value="${keyword }"/>" class="search-input" placeholder="输入商品名搜索" autofocus name="keyword" id="keyword" style="color: rgb(153, 153, 153);">
		<input id="stype" type="hidden" name="type" value="<c:out value="${type }" default="0"/>">
		<span class="search-btn">
			<button id="headSubmitBtn" type="submit">搜 索</button>
		</span>
	</form>
	</div>
	<script type="text/javascript">
		$(document).ready(function(){
			$("#categoryType").hover(function(){
                $("#typeList").show();
            },function(){
                $("#typeList").hide();
            });
			$("#typeList>li").each(function(i){ 
				$(this).children().click(function(){
					$("#stype").val($(this).attr("attr"));
					$("#typeItem").text($(this).text());
					$("#typeList").hide();
				});
			}); 
		});
	</script>
	<div class="clean"></div>
</div>
<div class="site-nav">
	<nav class="nav">
		<ul>
			<li <c:if test="${cat==1}">class="current"</c:if>>
				<a href="${ctx }/">
					<strong class="name">首&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;页</strong>
					<span class="nav-re-discount"></span>
					<i class="corner"></i> 
				</a>
			</li>
			<li <c:if test="${cat==2}">class="current"</c:if>>
				<a href="#">
					<strong class="name">更多折扣</strong>
					<span class="nav-more-discount"></span>
					<i class="corner"></i>
				</a>
			</li>
			<li <c:if test="${cat==3}">class="current"</c:if>>
				<a href="#">
					<strong class="name">趣淘返利</strong>
					<span class="nav-qutao-fanli"></span>
					<i class="corner"></i>
				</a>
			</li>
			<li <c:if test="${cat==4}">class="current"</c:if>>
				<a href="#">
					<strong class="name">玩转趣淘</strong>
					<span class="nav-fun-qutao"></span>
					<i class="corner"></i> 
				</a>
			</li>
			<li <c:if test="${cat==5}">class="current"</c:if>>
				<a href="#">
					<strong class="name">我的趣淘</strong>
					<span class="nav-my-qutao"></span>
					<i class="corner"></i> 
				</a>
			</li>
		</ul>
	</nav>
</div>